home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "DFWizardClass"
- Attribute VB_Creatable = True
- Attribute VB_Exposed = True
- Attribute VB_Description = "Data Form Designer"
- Dim AddInItems As Object 'VBIDE.MenuItems
- Dim DFDMenu As Object 'VBIDE.MenuLine
- Dim ConnectID As Long
-
- '------------------------------------------------------
- 'this method adds the Add-In to the VB menu
- 'it is called by the VB addin manager
- '------------------------------------------------------
- Sub ConnectAddIn(VBInst As VBIDE.Application)
- On Error GoTo error_handler
-
- Set gobjIDEAppInst = VBInst
- Set AddInItems = VBInst.AddInMenu.MenuItems
- Set DFDMenu = AddInItems.Add("Data Form Wizard...")
- ConnectID = DFDMenu.ConnectEvents(Me)
-
- Exit Sub
-
- error_handler:
- MsgBox Err.Description
- Exit Sub
-
- End Sub
-
- '------------------------------------------------------
- 'this method removes the Add-In from the VB menu
- 'it is called by the VB addin manager
- '------------------------------------------------------
- Sub DisconnectAddIn(ByVal mode As Integer)
- 'Disconnect the event handler
- DFDMenu.DisconnectEvents ConnectID
- 'remove it from the menu
- AddInItems.Remove DFDMenu
- End Sub
-
- '------------------------------------------------------
- 'this is the method that is executed when the user
- 'selects the Add-In from the VB menu
- '------------------------------------------------------
- Sub AfterClick()
- 'load and show the form
- frmDFD.Show vbModal
- End Sub
-